$(function(){
	let page=1;
	
	/**
	 * 加载分页数据
	 * @param {Object} current
	 */
	let loadData = function(current){
		$.get(
			"news-index2.do","current="+current+"&rowMax=1",
			function(data){
				formatData(data.list);
			},"json"
		);
	}
	let dataCommentDiv1 = $(".caption-news1").remove();
	/**
	 * 格式化数据
	 * @param {Object} list
	 */
	let formatData = function(list){
		$.each(list,function(i,item){
			let div1 = dataCommentDiv1.clone();
			$(".caption-news2").after(div1)
			div1.find(".news-w").text(item.newsTitle);
			div1.find(".news-w").attr("href","news-show-"+item.newsId+".html");
		});
		
	}
	
	loadData(page);
})
